package com.xmzgxcl.java202108.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;

@Controller
public class PublicController {
    //跳转登录页面
    @RequestMapping("/loginPage")
    public String loginPage(){
        return "login";
    }

    //跳转注册页面
    @RequestMapping("/registerPage")
    public String registerPage(){
        return "register";
    }

    //跳转系统首页面
    @RequestMapping("/home")
    public String homePage(){
        return "home";
    }

    //账号登录
    @PostMapping("/login")
    public String login(String username,String password){
        //登录验证核心代码
        return "redirect:/home";
    }

    //账号注册
    /*@PostMapping("/register")
    public String register(Employee employee){
        //注册新员工核心代码
        return "redirect:/home";
    }*/
}
